﻿#ifndef QUALIFYDOCU_H
#define QUALIFYDOCU_H

#include <QWidget>
#include<QString>
#include<QtSql>
#include<QCompleter>
#include"cadrepostdialog.h"
#include"iddialog.h"
#include"check_dialog.h"
#include"rewardorpunish.h"
#include"punishdialog.h"
#include"edudialog.h"
#include"workdialog.h"
#include"familydialog.h"
namespace Ui {
class qualifyDocu;
}

class qualifyDocu : public QWidget
{
    Q_OBJECT
signals:
    void sendID(QString);
public:
    explicit qualifyDocu(QWidget *parent = 0);
    ~qualifyDocu();
    void setLock();

    //QString getID();
private slots:
    //开始输入,有清空
    void click_edit();
    //保存
    void click_save();
    //输入单位职务
    void add_CadrePost();
    void del_CadrePost();
    //输入考核
    void add_Check();
    void del_Check();
    //输入奖惩
    void add_rorp();//奖励
    void add_punish();//惩处
    void del_reward();
    void del_punish();
    //输入教育经历
    void add_Edu();
    void del_Edu();
    //输入工作经历
    void add_Work();
    void del_Work();
    //输入家庭成员
    void add_family();
    void del_family();
    //保存name、id
    void updateData(QString,QString);
    //显示post、unit信息
    void showPostInfo();
    //显示考核信息
    void showCheckInfo();
    //显示奖
    void showRewardInfo();
    //显示惩处
    void showPunishInfo();
    //显示教育经历
    void showEduInfo();
    //显示工作经历
    void showWorkInfo();
    //显示家庭成员
    void showFamilyInfo();


    void on_saveButton_clicked();

private:
    Ui::qualifyDocu *ui;
    QCompleter* completer;
    IDDialog* id_dialog;
    cadrepostDialog* post_dialog;
    check_dialog* check_dia;
    rewardorpunish* reorpuDia;
    punishDialog* punishDia;
    eduDialog* edu_dia;
    workDialog* work_dia;
    familyDialog* fam_dia;
    QSqlDatabase db;
};

#endif // QUALIFYDOCU_H
